package service

import context "context"

// 供在main中注册使用
var ProductServiceObj = &ProductService{}

type ProductService struct {
}

func (p *ProductService) GetProductStock(c context.Context, req *ProductRequest) (*ProductResponse, error) {
	// 实现具体的业务逻辑
	stock := p.GetStockById(req.ProdId)
	return &ProductResponse{ProdStock: stock}, nil
}

func (p *ProductService) GetStockById(prodId int32) int32 {
	return 100
}
